home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Fun House 8
/
CD Funhouse Version 8.0 - Wayzata Technology (7013) (1993).iso
/
pc
/
pc
/
cards
/
bidding
/
bidding.h
< prev
next >
Wrap
C/C++ Source or Header
|
1989-02-14
|
2KB
|
88 lines
/* bidding.h */
/*
Bridge Bidder Version 2.0
by Nathan Glasser
nathan@brokaw.lcs.mit.edu (internet)
nathan@mit-eddie.uucp (usenet)
February, 1989
------------------------------------------------------------------------------
Copyright 1988, 1989 by Nathan Glasser.
You may feel free to distribute this program in its current form.
Please do not remove this copyright information.
*/
#include <stdio.h>
#include <ctype.h>
#ifdef MSDOS
#include <string.h>
#include <stdlib.h>
#define random rand
#define srandom srand
#define index strchr
#else
#include <strings.h>
#endif
#define LOGFILE "bidding.log"
#define JACK 11
#define QUEEN 12
#define KING 13
#define ACE 14
#define SPADES 0
#define HEARTS 1
#define DIAMONDS 2
#define CLUBS 3
#define NOTRUMP 4
#define RANK_USED 4
#define DOUBLE 5
#define REDOUBLE 6
#define PASS 7
#define FIRSTPAIR 0
#define SECONDPAIR 1
#define RELATIVE 1
#define NEITHER 2
#define BOTH 3
struct card_or_bid {
int rank;
int suit;
};
typedef struct card_or_bid card;
typedef struct bid {
struct card_or_bid bid;
struct bid *next,*prev;
} bid;
typedef card hand[13];
typedef struct deal {
hand hands[4];
int vulnerability;
bid *bids;
int num_bids;
int bidding_done;
card opening_lead;
} deal;
/* Individual users may want to modify these values for their system. */
/* Default number of bridge hands (boards) to deal. */
#define DEF_NUM_HANDS 10
/* If you wish to use formfeeds to clear the screen instead of repeated
newlines, comment out the definition of SCREEN_CLEAR_SIZE. Otherwise
this value indicates the number of newlines to use for this purpose. */
#define SCREEN_CLEAR_SIZE 24